package model;

public class Iax extends Model {

	//GENERAL
	private String bandWidth;
	private String disallow;
	private String jitterBuffer;
	private String jitterBufferGUI;
	private String forceJitterBuffer;
	private String forceJitterBufferGUI;
	private String tos;
	private String autoKill;
	private String autoKillGUI;
	
	//ESPECÍFICOS
	private String callerId;
	private String type;
	private String userName;
	private String secret;
	private String context;
	private String host;
	private String auth;
	private String transfer;
	private String allow;
	private String dbSecret;
	private String trunk;
	private String trunkGUI;
	
	public String getCallerId() {
		return callerId;
	}
	public void setCallerId(String callerId) {
		this.callerId = callerId;
	}
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
	public String getUserName() {
		return userName;
	}
	public void setUserName(String userName) {
		this.userName = userName;
	}
	public String getSecret() {
		return secret;
	}
	public void setSecret(String secret) {
		this.secret = secret;
	}
	public String getContext() {
		return context;
	}
	public void setContext(String context) {
		this.context = context;
	}
	public String getHost() {
		return host;
	}
	public void setHost(String host) {
		this.host = host;
	}
	public String getAuth() {
		return auth;
	}
	public void setAuth(String auth) {
		this.auth = auth;
	}
	public String getTransfer() {
		return transfer;
	}
	public void setTransfer(String transfer) {
		this.transfer = transfer;
	}
	public String getBandWidth() {
		return bandWidth;
	}
	public void setBandWidth(String bandWidth) {
		this.bandWidth = bandWidth;
	}
	public String getDisallow() {
		return disallow;
	}
	public void setDisallow(String disallow) {
		this.disallow = disallow;
	}
	public String getJitterBuffer() {
		return jitterBuffer;
	}
	public void setJitterBuffer(String jitterBuffer) {
		this.jitterBuffer = jitterBuffer;
	}
	public String getJitterBufferGUI() {
		
		if (this.jitterBuffer != null && this.jitterBuffer.matches("yes")) {
			this.jitterBufferGUI = "checked";
		} else {
			this.jitterBufferGUI = "";
		}
		
		return this.jitterBufferGUI;
	}
	public void setJitterBufferGUI(String jitterBufferGUI) {
		
		if (jitterBufferGUI.matches("on")) {
			this.setJitterBuffer("yes");
		} else {
			this.setJitterBuffer("no");
		}
		
		this.jitterBufferGUI = jitterBufferGUI;
	}
	public String getForceJitterBuffer() {
		return forceJitterBuffer;
	}
	public void setForceJitterBuffer(String forceJitterBuffer) {
		this.forceJitterBuffer = forceJitterBuffer;
	}
	public String getForceJitterBufferGUI() {
		
		if (this.forceJitterBuffer != null && this.forceJitterBuffer.matches("yes")) {
			this.forceJitterBufferGUI = "checked";
		} else {
			this.forceJitterBufferGUI = "";
		}
		
		return this.forceJitterBufferGUI;
	}
	public void setForceJitterBufferGUI(String forceJitterBufferGUI) {
		
		if (forceJitterBufferGUI.matches("on")) {
			this.setForceJitterBuffer("yes");
		} else {
			this.setForceJitterBuffer("no");
		}
		
		this.forceJitterBufferGUI = forceJitterBufferGUI;
	}
	public String getTos() {
		return tos;
	}
	public void setTos(String tos) {
		this.tos = tos;
	}
	public String getAutoKill() {
		return autoKill;
	}
	public void setAutoKill(String autoKill) {
		this.autoKill = autoKill;
	}
	public String getAutoKillGUI() {
		
		if (this.autoKill != null && this.autoKill.matches("yes")) {
			this.autoKillGUI = "checked";
		} else {
			this.autoKillGUI = "";
		}
		
		return this.autoKillGUI;
	}
	public void setAutoKillGUI(String autoKillGUI) {
		
		if (autoKillGUI.matches("on")) {
			this.setAutoKill("yes");
		} else {
			this.setAutoKill("no");
		}
		
		this.autoKillGUI = autoKillGUI;
	}
	public String getAllow() {
		return allow;
	}
	public void setAllow(String allow) {
		this.allow = allow;
	}
	public String getDbSecret() {
		return dbSecret;
	}
	public void setDbSecret(String dbSecret) {
		this.dbSecret = dbSecret;
	}
	public String getTrunk() {
		return trunk;
	}
	public void setTrunk(String trunk) {
		this.trunk = trunk;
	}
	public String getTrunkGUI() {
		
		if (this.trunk != null && this.trunk.matches("yes")) {
			this.trunkGUI = "checked";
		} else {
			this.trunkGUI = "";
		}
		
		return this.trunkGUI;
	}
	public void setTrunkGUI(String trunkGUI) {
		
		if (trunkGUI.matches("on")) {
			this.setTrunk("yes");
		} else {
			this.setTrunk("no");
		}
		
		this.trunkGUI = trunkGUI;
	}
}
